﻿@model Gfw.Web.Models.Account.WarrantTransferModel
@{
    ViewBag.Title = "担保转账";
    Layout = "~/Views/Shared/_LayoutContent.cshtml";
}

<h2 style="color: Blue">当前为：担保转账</h2>


@using (Html.BeginForm())
{
    @Html.HiddenFor(model => model.UserID)
    
    @Html.HiddenFor(model => model.QQ)
    @Html.HiddenFor(model => model.Tel)
    @Html.HiddenFor(model => model.Balance)
    @Html.HiddenFor(model => model.BankAddress)
    @Html.HiddenFor(model => model.BankCardNo)
    @Html.HiddenFor(model => model.BankName)
    @Html.HiddenFor(model => model.BankUserName)
    @Html.HiddenFor(model => model.Alipay)
    @Html.HiddenFor(model => model.TenPay)

    <h4>
        @Html.DisplayNameFor(model => model.QQ)
        : 
        @Html.DisplayFor(model => model.QQ)
        @Html.ActionLink("【去修改资料】", "ChangeUserBasicInfo", "User")
    </h4>
    <h4>
        @Html.DisplayNameFor(model => model.Tel)
        : 
        @Html.DisplayFor(model => model.Tel)
        @Html.ActionLink("【去修改资料】", "ChangeUserBasicInfo", "User")
    </h4>
    <h4>
        @Html.DisplayNameFor(model => model.Balance)
        : 
        @Html.DisplayFor(model => model.Balance)
    </h4>
    
    <h4>请选择交易方式：（对方将以您所选方式进行操作）</h4>
    <div>
        @{
    if (string.IsNullOrWhiteSpace(Model.BankName) ||
        string.IsNullOrWhiteSpace(Model.BankCardNo) ||
        string.IsNullOrWhiteSpace(Model.BankUserName))
    {
            @Html.RadioButton("transferInfo", "Bank", new { disabled = "disabled" })
            @Html.ActionLink("【去完善资料】", "ChangeUserBindingInfo", "User")
    }
    else
    {
            @Html.RadioButton("transferInfo", "Bank")
            @Html.DisplayNameFor(model => model.BankName) 
            @: :
            @Html.DisplayFor(model => model.BankName)

            <br />
            @Html.DisplayNameFor(model => model.BankCardNo) 
            @: :
            @Html.DisplayFor(model => model.BankCardNo)

            <br />
            @Html.DisplayNameFor(model => model.BankUserName) 
            @: :
            @Html.DisplayFor(model => model.BankUserName)
    }
        }
    </div>
    
    <div>
        @{
    if (string.IsNullOrWhiteSpace(Model.TenPay) ||
        string.IsNullOrWhiteSpace(Model.BankUserName))
    {
            @Html.RadioButton("transferInfo", "Tenpay", new { disabled = "disabled" })
            @Html.ActionLink("【去完善资料】", "ChangeUserBindingInfo", "User")
    }
    else
    {
            @Html.RadioButton("transferInfo", "Tenpay")
            @Html.DisplayNameFor(model => model.TenPay) 
            @: :
            @Html.DisplayFor(model => model.TenPay)
    }
        }
    </div>
    
    <div>
        @{
    if (string.IsNullOrWhiteSpace(Model.Alipay) ||
        string.IsNullOrWhiteSpace(Model.BankUserName))
    {
            @Html.RadioButton("transferInfo", "Alipay", new { disabled = "disabled" })
            @Html.ActionLink("【去完善资料】", "ChangeUserBindingInfo", "User")
    }
    else
    {
            @Html.RadioButton("transferInfo", "Alipay")
            @Html.DisplayNameFor(model => model.Alipay) 
            @: :
            @Html.DisplayFor(model => model.Alipay)
    }
        }
    </div>
    
    <br />
    <div class="display-label">
        @Html.DisplayNameFor(model => model.Count)
    </div>
    <div class="display-field">
        @Html.TextBoxFor(model => model.Count)
        @Html.ValidationMessageFor(m => m.Count)
    </div>

    <div class="display-label">
        @Html.DisplayNameFor(model => model.ToUser)
    </div>
    <div class="display-field">
        @Html.TextBoxFor(model => model.ToUser)
        @Html.ValidationMessageFor(m => m.ToUser)
    </div>
    @Html.ValidationSummary(true)
    <input type="submit" value="担保转账" onclick="this.disabled = true; this.form.submit();"/>
}

<p>
    @Html.ActionLink("查询转账记录", "TransferQuery") | 
    @Html.ActionLink("查询担保交易", "WarrantTransferQueryIndex")
</p>

@{
    if (ViewBag.Done)
    {
    <div id="dialog" title="Dialog Title">
        <h5>担保转账成功！已转入中间方。</h5>
          <div class="button">
            <input type="button" onclick="javascript:closedialog()" value="继续担保转账"/>
            <p>
                @Html.ActionLink("查询转账记录", "TransferQuery") | 
                @Html.ActionLink("查询担保交易", "WarrantTransferQueryIndex")
            </p>
        </div>
    </div>
    <script type="text/javascript">

        $(document).ready(function () {
            $("#dialog").dialog({ title: "操作提示", modal: true });
        });

        function closedialog() {
            $("#dialog").dialog("close");
        }

    </script>
    }
}
